package IC.lir.Instrunction;

public abstract class Memory extends Data 
{
	abstract public Instruction Store(Storable what);
	
	/**
	 * If possible and toWhere == null then returns a Load Instruction that loads to one of the used registers.
	 */
	abstract public Instruction Load(Register toWhere);
	
	/**
	 * If possible then returns a Load Instruction that loads to one of the used registers, 
	 * 		otherwise creates a new register with index registerNum.
	 */
	abstract public Instruction Load(int registerNum);
	
	/**
	 * If possible to reuse register in Load, this function will return that register, 
	 * 		otherwise a new register with index  registerNum
	 */
	abstract public Register GetStoreRegister(int registerNum);
	
	abstract public int GetNumOfRegisters();
}
